-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(contracts/misc): add V0 draft of Tag #2726
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
// Pay gas if requested | ||
if (payGas) _sendGas(to); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple things on _sendGas?
how do we make sure we have enough to service requests? prefunding, monitoring, and funding if needed?if transfer in _sendGas fails, then the call reverts. NFT is not minted and user is not refunded. Is that what we want?
Sorry still reading, see you use gas pump for this. nice
Sorry accidently submitted my review before finising. Still looking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Let's start working on some tests. If requirements are still in flight and you want to wait that's fine. But if you don't expect big changes i say let's get testin. Lot of code here
|
||
function getTagCount(uint256 tokenId) public view returns (uint32) { | ||
return _getTagCount(tokenId); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ones that just proxy internal functions ^
Let's mark their public counterparts as external. Saves some gas. And otherwise there would be no reason for 2 separate functions
tagCooldown = 1 minutes; | ||
price = 1 ether; | ||
|
||
if (block.chainid != OMNI_CHAIN_ID) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to deploy on a non-mainnet network for testing, you can pass this in or just read it from the portal omniChainId()
(from XApp) and set it to an immutable
function getPendingTagQueueLength(uint256 tokenId) public view returns (uint256) { | ||
uint96 cursor = uint16(_getExtraData(tokenId) >> 80); | ||
return tagQueue[tokenId].length - cursor; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment here (or elsewhere) explaining cursor plz
) | ||
); | ||
return requiredEth + pumpFee + feeFor(OMNI_CHAIN_ID, data, MINT_GAS_LIMIT); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So mints only mint on omni?
/* INTERNAL FUNCTIONS */ | ||
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ | ||
|
||
function _hasClaimedWhitelist(address minter) public view returns (bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is still public
Built out an initial draft of a crosschain tag game, playable via NFTs.
issue: none